package main

import (
	"crypto/ecdsa"
	"crypto/elliptic"
	"crypto/rand"
	"encoding/hex"
	"fmt"
)

func FF1(name string) string {
	fmt.Println("原来名称：", name)
	name = name + "-01"
	append(name)
	return name
}

func FF2(ff func(name string) string, age int) string {
	fmt.Println(ff("wyc"))
	fmt.Println("age=", age)
	return "够了"
}

func main() {
	FF2(func(name string) string {
		return name + "-02"
	}, 10)

	curve1 := elliptic.P256()
	privateKey1, _ := ecdsa.GenerateKey(curve1, rand.Reader)

	privaKey := hex.EncodeToString(privateKey1.D.Bytes())                                                        //私钥
	publicKey := hex.EncodeToString(append(privateKey1.PublicKey.X.Bytes(), privateKey1.PublicKey.Y.Bytes()...)) //公钥
}
